package com.mimosa.common.system.menu;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang3.StringUtils;

import com.mimosa.common.entity.BaseEntity;
import com.mimosa.util.config.YesNoType;

/**
 * 菜单信息
 * 
 * @author ggeagle
 * 
 */
@Entity
@Table(name = "T_MENU")
public class TMenuItem extends BaseEntity {
	/**
	 * 菜单名称
	 */
	@Column(length = 64, nullable = false)
	private String menuName = StringUtils.EMPTY;
	/**
	 * 数据编码
	 */
	private String menuCode;
	/**
	 * 菜单地址
	 */
	@Column(length = 64, nullable = true)
	private String menuUrl = StringUtils.EMPTY;
	/**
	 * 菜单图标
	 */
	@Column(length = 256, nullable = false)
	private String menuIcon = StringUtils.EMPTY;
	/**
	 * 菜单 的路径5
	 */
	@Column(length = 64, nullable = false)
	private String menuPath = StringUtils.EMPTY;
	/**
	 * 是否需要登陆
	 */
	@Column(length = 5, nullable = false)
	private String needAuth = YesNoType.Y.name();
	/**
	 * 是否需要登陆
	 */
	@Column(length = 5, nullable = false)
	private String needGrant = YesNoType.N.name();

	@Column(length = 5, nullable = false)
	private String state = YesNoType.Y.name();

	@Column(length = 2048, nullable = true)
	private String menuDesc;

	@Column(length = 5, nullable = false)
	private Integer childNum = 0;

	public Integer getChildNum() {
		return childNum;
	}

	public void setChildNum(Integer childNum) {
		this.childNum = childNum;
	}

	public String getMenuDesc() {
		return menuDesc;
	}

	public void setMenuDesc(String menuDesc) {
		this.menuDesc = menuDesc;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getMenuName() {
		return menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	public String getMenuUrl() {
		return menuUrl;
	}

	public void setMenuUrl(String menuUrl) {
		this.menuUrl = menuUrl;
	}

	public String getMenuIcon() {
		return menuIcon;
	}

	public void setMenuIcon(String menuIcon) {
		this.menuIcon = menuIcon;
	}

	public String getNeedAuth() {
		return needAuth;
	}

	public void setNeedAuth(String needAuth) {
		this.needAuth = needAuth;
	}

	public String getMenuPath() {
		return menuPath;
	}

	public void setMenuPath(String menuPath) {
		this.menuPath = menuPath;
	}

	public String getNeedGrant() {
		return needGrant;
	}

	public void setNeedGrant(String needGrant) {
		this.needGrant = needGrant;
	}

	public String getMenuCode() {
		return menuCode;
	}

	public void setMenuCode(String menuCode) {
		this.menuCode = menuCode;
	}
}